package com.hh.fudan.project_management.bean;

import java.util.List;
import java.util.ArrayList;

import com.hh.fudan.project_management.R;

import android.view.View;  
import android.widget.ImageView;  
import android.widget.TextView;  
  
public class ViewCache {  
  
        private View baseView;  
        private List<TextView> textView = new ArrayList<TextView>();  
        private ImageView imageView;  
  
        public ViewCache(View baseView) {  
            this.baseView = baseView;  
        }  
  
        public List<TextView> getTextView() {  
            if (textView.size() == 0) {  
                textView.add((TextView) baseView.findViewById(R.id.deal_price)); 
                textView.add((TextView) baseView.findViewById(R.id.deal_dealValue)); 
                textView.add((TextView) baseView.findViewById(R.id.deal_title)); 
                textView.add((TextView) baseView.findViewById(R.id.deal_oid)); 
            }  
            return textView;  
        }  
  
        public ImageView getImageView() {  
            if (imageView == null) {  
                imageView = (ImageView) baseView.findViewById(R.id.image_deal);  
            }  
            return imageView;  
        }  
  
}  